#########################
#   Cmd projet Django   #
#########################

all: messages compile

messages:
	django-admin.py makemessages -l en
	django-admin.py makemessages -l fr
	django-admin.py makemessages -l ar
	django-admin.py makemessages -l es

compile:
	django-admin.py compilemessages

clean:
	find -L . -name "*~" -exec rm -fr {} \;
	find -L . -name "*.pyc" -exec rm -fr {} \;
	find -L . -name ".DS_Store" -exec rm -fr {} \;
	find -L . -name "Thumbs.db" -exec rm -fr {} \;
	find -L . -name "Thumbs.db:encryptable" -exec rm -fr {} \;
	find -L . -name "*_q85.jpg" -exec rm -fr {} \;

runserver:
	python manage.py runserver 0.0.0.0:8000 --adminmedia=$(PWD)/medias/admin/

cp_settings:
	cp ./settings.py ./settings.py.example

dumpdata:
	python manage.py dumpdata --exclude=contenttypes --exclude=sessions --format yaml --indent 4 > initial_data.yaml

mail:
	python -m smtpd -n -c DebuggingServer localhost:1025
